import request from "@/request/api";

//正常作业标准接口
//1.正常作业标准查询接口
export function queryMaintainList(data) {
  return request({
    url: "/eam-service-standard/maintain/page",
    method: "get",
    params: data,
  });
}
//1.根据id查询标准详情
export function queryMaintainDetail(data) {
  return request({
    url: "/eam-service-standard/maintain",
    method: "get",
    params: data,
  });
}
//2、正常作业标准新增接口
export function addMaintain(data) {
  return request({
    url: "/eam-service-standard/maintain",
    method: "post",
    data: data,
  });
}
//2、正常作业标准修改接口
export function updateMaintain(data) {
  return request({
    url: "/eam-service-standard/maintain",
    method: "put",
    data: data,
  });
}
//3、正常作业标准删除接口
export function deleteMaintain(data) {
  return request({
    url: "/eam-service-standard/maintain",
    method: "delete",
    params: data,
  });
}
// 正常作业标准导入接口
export function maintainImport(data, formData) {
  return request({
    url: "/eam-service-standard/maintain/import",
    method: "post",
    params: data,
    data: formData,
  });
}

//设置标准状态
export function setStandardStatus(data) {
  return request({
    url: "/eam-service-standard/maintain/updateStatus",
    method: "put",
    params: data,
  });
}
//设置为公共标准
export function setCommonStandard(data) {
  return request({
    url: "/eam-service-standard/maintain/updateToPublic",
    method: "put",
    params: data,
  });
}

//1.大修标准查询接口
export function queryOverhaulList(data) {
  return request({
    url: "/eam-service-standard/overhaul/page",
    method: "get",
    params: data,
  });
}
//1.根据id查询大修标准详情
export function queryOverhaulDetail(data) {
  return request({
    url: "/eam-service-standard/overhaul",
    method: "get",
    params: data,
  });
}
//2、大修标准新增接口
export function addOverhaul(data) {
  return request({
    url: "/eam-service-standard/overhaul",
    method: "post",
    data: data,
  });
}
//2、大修标准修改接口
export function updateOverhaul(data) {
  return request({
    url: "/eam-service-standard/overhaul",
    method: "put",
    data: data,
  });
}
//3、大修标准删除接口
export function deleteOverhaul(data) {
  return request({
    url: "/eam-service-standard/overhaul",
    method: "delete",
    params: data,
  });
}
// 大修标准导入接口
export function overhaulImport(data, formData) {
  return request({
    url: "/eam-service-standard/overhaul/import",
    method: "post",
    params: data,
    data: formData,
  });
}

//设置大修标准状态
export function setOverhaulStatus(data) {
  return request({
    url: "/eam-service-standard/overhaul/updateStatus",
    method: "put",
    params: data,
  });
}
//设置大修标准为公共标准
export function setCommonOverhaul(data) {
  return request({
    url: "/eam-service-standard/overhaul/updateToPublic",
    method: "put",
    params: data,
  });
}

//1.计划性检修标准查询接口
export function queryRepairList(data) {
  return request({
    url: "/eam-service-standard/repair/page",
    method: "get",
    params: data,
  });
}
//1.根据id查询计划性检修标准详情
export function queryRepairDetail(data) {
  return request({
    url: "/eam-service-standard/repair",
    method: "get",
    params: data,
  });
}
//2、计划性检修标准新增接口
export function addRepair(data) {
  return request({
    url: "/eam-service-standard/repair",
    method: "post",
    data: data,
  });
}
//2、计划性检修标准修改接口
export function updateRepair(data) {
  return request({
    url: "/eam-service-standard/repair",
    method: "put",
    data: data,
  });
}
//3、计划性检修标准删除接口
export function deleteRepair(data) {
  return request({
    url: "/eam-service-standard/repair",
    method: "delete",
    params: data,
  });
}
// 计划性检修标准导入接口
export function repairImport(data, formData) {
  return request({
    url: "/eam-service-standard/repair/import",
    method: "post",
    params: data,
    data: formData,
  });
}

//设置计划性检修标准状态
export function setRepairStatus(data) {
  return request({
    url: "/eam-service-standard/repair/updateStatus",
    method: "put",
    params: data,
  });
}
//设置计划性检修为公共标准
export function setCommonRepair(data) {
  return request({
    url: "/eam-service-standard/repair/updateToPublic",
    method: "put",
    params: data,
  });
}

//1.试验标准查询接口
export function queryExperimentList(data) {
  return request({
    url: "/eam-service-standard/experiment/page",
    method: "get",
    params: data,
  });
}
//1.根据id查询试验标准详情
export function queryExperimentDetail(data) {
  return request({
    url: "/eam-service-standard/experiment",
    method: "get",
    params: data,
  });
}
//2、试验标准新增接口
export function addExperiment(data) {
  return request({
    url: "/eam-service-standard/experiment",
    method: "post",
    data: data,
  });
}
//2、试验标准修改接口
export function updateExperiment(data) {
  return request({
    url: "/eam-service-standard/experiment",
    method: "put",
    data: data,
  });
}
//3、试验标准删除接口
export function deleteExperiment(data) {
  return request({
    url: "/eam-service-standard/experiment",
    method: "delete",
    params: data,
  });
}
// 试验标准导入接口
export function experimentImport(data, formData) {
  return request({
    url: "/eam-service-standard/experiment/import",
    method: "post",
    params: data,
    data: formData,
  });
}

//设置试验标准状态
export function setExperimentStatus(data) {
  return request({
    url: "/eam-service-standard/experiment/updateStatus",
    method: "put",
    params: data,
  });
}
//设置试验为公共标准
export function setCommonExperiment(data) {
  return request({
    url: "/eam-service-standard/experiment/updateToPublic",
    method: "put",
    params: data,
  });
}

//设计试验报告模板
export function designExperiment(data) {
  return request({
    url: "/eam-service-order/experiment/execute/getPrintTemplate",
    method: "get",
    params: data,
  });
}

//预览试验报告模板
export function previewExperiment(data) {
  return request({
    url: "/eam-service-order/experiment/execute/previewExperiment.htm",
    method: "get",
    params: data,
  });
}
